package com.cy.sys.log.page.vo;

import lombok.Data;

@Data
public class JSONResult {
	private Integer state = 1; 
	private String message = "ok";
	private Object data;
	
	public JSONResult() {}
	
	
	public JSONResult(String message) {
		this.message = message;
	}
	//正常数据对象封装
	public JSONResult(Object data) {
		this.data = data;
	}
	//处理异常数据
	public JSONResult(Throwable T) {
		this.state = 0;
		this.message = T.getMessage();	
	}
}
